$(document).ready(function(){
    $(".i-checks").iCheck({
        checkboxClass:"icheckbox_square-green",
        radioClass:"iradio_square-green",
    });

    $("#save").click(function(){

        var username = $.trim($("input[name='user']").val());
        var images_id = $.trim($("#uploader-demo").attr('data-id'));

        if(user == ''){
            layer.msg("请填写会员姓名");
            return false;
        }


        alert(images_id);
        $.ajax({
            'url': GV.member_editmember,
            'type':'post',
            'data':{'username':username,'images_id':images_id},
            success:function(data){
                console.log(data);
                if(data.status == 1){
                    layer.msg(data.info);
                    setTimeout(function(){
                        location.href = data.url;
                    },1000);
                }else{
                    layer.msg(data.info);
                    location.href = data.url;
                }
            }
        });
    });
});